import yaml

from yaml import SafeLoader

from datareport.api.DataSource import DataSource
from datareport.api.annotation.Font import Font
from datareport.api.enum.FontEnum import FontEnum
from datareport.impl.paragraph.base.BaseParagraph import BaseParagraph
from datareport.api.annotation.Style import style
from datareport.api.enum.ParagraphStyleEnum import ParagraphStyleEnum


@style(paragraph=ParagraphStyleEnum.LEVEL_TWO.value)
class KaiZhanQingKuang_zhiliangpinjia_49(BaseParagraph):
    """
    (四) 组织生活质量评价分析
    """

    def __init__(self):
        super().__init__()
        self.fonts = [
            Font(type=FontEnum.LEVEL_TWO.value, text='''(四) 组织生活质量评价分析''')
        ]
        self.sort = 38
        self.section = 13

    def plot(self, df, plt):
        pass

    def getData(self, result):
        pass

    def start(self, conn, year, plt):
        pass


def list2str(l):
    return '、'.join(l)


if __name__ == '__main__':
    with open('D:\work\sanhuiyike\datareport\config.yaml', encoding='utf-8') as f:
        data = yaml.load(f, Loader=SafeLoader)
    con = DataSource(data['datasource']).conn
    KaiZhanQingKuang_zhuti_zhuti().start(con, 2023, '')
